package modules

import (
	"app/app_src/framework/ioc"
	security_strategy "app/app_src/framework/security/strategy"
	login_impl "app/app_src/modules/login/impl"
)

// 注入 IOC 依赖
func InjectDependencies(builder *ioc.Builder) {
	// 初始 current_subject 的方法
	var initFunc security_strategy.InitCurrentSubject = login_impl.InitCurrentSubject
	builder.Any(security_strategy.IOC_KEY_INIT_CURRENT_SUBJECT, initFunc)

	// 验证 CSRF 令牌的方法
	var checkFunc security_strategy.CheckCsrfToken = login_impl.CheckCsrfToken
	builder.Any(security_strategy.IOC_KEY_CHECK_CSRF_TOKEN, checkFunc)
}
